<%--
  Created by IntelliJ IDEA.
  User: TOTORO
  Date: 2021/6/4
  Time: 14:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>账户注册 | 天猫</title>
    <%--    jquery   css--%>
    <link rel="stylesheet" href="/static/css/public.css">
    <link rel="stylesheet" href="/static/css/user/reg.css">
    <script src="${pageContext.request.contextPath}/static/js/frame/jquery-3.5.1.min.js"></script>
    <style>
        body{
            font: 400 12px/1.6 arial,'Hiragino Sans GB',\5b8b\4f53,sans-serif;
        }
        #change-email{
            cursor: pointer;
        }
    </style>
</head>
<body>
<%--注册界面共同的头部(样式不同)--%>
<div class="primary-box page">
    <%-- 身体 --%>
    <div class="content">
        <div class="email-sent">
            <h2><span class="tsl">验证邮件已送达</span>&nbsp;<em id="email-text">${param.email}</em></h2>
            <p class="tsl">请登录邮箱，点击激活链接完成注册，激活链接在24小时内有效。</p>
            <div class="email-sent-op">
                <input type="hidden" id="J_Email" value="185780557@qq.com">
                <input type="hidden" id="J_UserNumId" value="">
                <a class="form-submit" target="_blank" id="J_GoToEmailWeb" href="http://mail.qq.com/?spm=a2145.7275817.0.0.69da5d7c2ypqo0" style="min-width: 20px;">请查收邮件</a>
                <div class="email-sent-noreceived" style="display: inline-block; width: 271px">
                    <a href="#nogo" class="tsl" id="J_NoReceiveHandler">没有收到邮件？</a>
                    <div class="tips tips-below tips-email" id="J_TipsEmailNoReceived" style="display: none;">
                        <i></i>
                        <div class="tips-body">
                            <ul>
                                <li class="tsl">请检查垃圾邮件箱</li>
                                <li><span class="tsl">如果还没有收到邮件，</span><button class="btn-resend-email tsl" data-phase-id="r_2_reSendMailButton" id="J_ReSendEmail">重新发送邮件</button></li>
                                <li><span class="tsl">没有收到？ </span>
                                    <a  class="tsl" data-phase-id="r_2_changeMailButton" style="color: #ff5b20" id="change-email">更换邮箱</a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script>
    $(function () {
        $(".email-sent-noreceived").mouseenter(function () {
            $(".tips-email").show();
        });

        $(".email-sent-noreceived").mouseleave(function () {
            $(".tips-email").hide();
        })

        $(".tips-email").mouseenter(function () {
            $(this).show();
        });
        $(".tips-email").mouseleave(function () {
            $(this).hide();
        })

        // 重新发送邮件
        $(".btn-resend-email").click(function () {
            var email = $("#email-text").text();
                $.ajax({
                    type:"POST",
                    url:"register/sent_email.htm",
                    async:true,
                    data: {'email': email},
                    success:function (html) {
                        $(".emaill-dialog").show().html(html);
                        $(".btn-resend-email").text("已发送");
                    }
                });
        })

        // 更换邮箱
        $("#change-email").click(function () {
            $.ajax({
                type: "GET",
                url: "/user_process/email_mobile.jsp",
                async: false, // 是否异步处理
                success: function (rt) {
                    $(".emaill-dialog").show().html(rt);
                }
            });
        })
    })
</script>
</html>
